package com.showcai.module;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

public class ProductEntity extends BaseModule {
    /**
     * 有效
     */
    public static final Byte PRODUCT_ENTITY_STAUTS_VALID = 1;
    /**
     * 无效
     */
    public static final Byte PRODUCT_ENTITY_STAUTS_UNVALID = 0;
    /**
     * 下架
     */
    public static final Byte PRODUCT_ENTITY_STAUTS_UNSHELVE = 2;


    private Long productId;

    private Long productEntityId;

    private String productEntityName;

    private String unit;
    private String phone;



    private Integer price;
    private String picPath;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date onlineDate;
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date offlineDate;


    private Long organizationId;

    private String productEntityIntroduce;
    private String productEntityIntro;
    private String address;
    private Integer balance;

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getBalance() {
        return balance;
    }

    public void setBalance(Integer balance) {
        this.balance = balance;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getProductEntityId() {
        return productEntityId;
    }

    public void setProductEntityId(Long productEntityId) {
        this.productEntityId = productEntityId;
    }

    public String getProductEntityName() {
        return productEntityName;
    }

    public void setProductEntityName(String productEntityName) {
        this.productEntityName = productEntityName;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getOnlineDate() {
        return onlineDate;
    }

    public void setOnlineDate(Date onlineDate) {
        this.onlineDate = onlineDate;
    }
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    public Date getOfflineDate() {
        return offlineDate;
    }

    public void setOfflineDate(Date offlineDate) {
        this.offlineDate = offlineDate;
    }


    public Long getOrganizationId() {
        return organizationId;
    }

    public void setOrganizationId(Long organizationId) {
        this.organizationId = organizationId;
    }

    public String getProductEntityIntroduce() {
        return productEntityIntroduce;
    }

    public void setProductEntityIntroduce(String productEntityIntroduce) {
        this.productEntityIntroduce = productEntityIntroduce;
    }

    public String getProductEntityIntro() {
        return productEntityIntro;
    }

    public void setProductEntityIntro(String productEntityIntro) {
        this.productEntityIntro = productEntityIntro;
    }
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }
    @Override
    public String toString() {
        return "ProductEntity{" +
                "productId=" + productId +
                ", productEntityId=" + productEntityId +
                ", productEntityName='" + productEntityName + '\'' +
                ", unit='" + unit + '\'' +
                ", price=" + price +
                ", picPath='" + picPath + '\'' +
                ", onlineDate=" + onlineDate +
                ", offlineDate=" + offlineDate +
                ", organizationId=" + organizationId +
                ", productEntityIntroduce='" + productEntityIntroduce + '\'' +
                ", productEntityIntro='" + productEntityIntro + '\'' +
                ", address='" + address + '\'' +
                ", balance=" + balance +
                '}';
    }
}